import { Tree, type TreeNode } from '#/components'

const treeNode: TreeNode[] = [
  {
    id: 1,
    name: '1',
    children: [
      {
        id: 11,
        name: '1-1',
        children: [
          {
            id: 111,
            name: '1-1-1',
            selected: true
          },
          {
            id: 112,
            name: '1-1-2',
            selected: false
          }
        ],
        selected: true
      }
    ],
    selected: true
  },
  {
    id: 2,
    name: '2',
    children: [
      {
        id: 21,
        name: '2-1',
        children: [
          {
            id: 211,
            name: '2-1-1',
            selected: false
          }
        ],
        selected: false
      }
    ],
    selected: false
  }
]

function App() {
  return <>
    <div>
      <Tree data={treeNode} onSelect={(data: TreeNode) => {
        console.log(data);
      }} />
    </div>
  </>
}

export default App
